import {view, View, binder} from "adajs";
import SubmenuService from "./state.js";

@view({
    className: "submenu",
    template: "./template.html",
    style: "./style.scss",
    dataset: {
        service: SubmenuService
    }
})
class Submenu extends View {
    @binder("openPage")
    openPage({sub}) {
        this.dispatchEvent("gotoPage", sub.link);
    }
}

export default Submenu;